org.eclipse.vtp.desktop.projects.core.export
Class Exporter

java.lang.Object
  extended by org.eclipse.vtp.desktop.projects.core.export.Exporter

public class Exporter
extends java.lang.Object

Strategy for exporting projects as web applications.

Author:
Lonnie Pryor

Constructor Summary
Exporter(org.eclipse.ui.IWorkbench workbench)
          Creates a new Exporter.
 
Method Summary
 void addExporterObserver(ExporterObserver observer)
          Adds an observer to this exporter.
 void deselectProject(java.lang.String projectName)
          Marks the specified project as not selected.
 void exportWebApplication(org.eclipse.core.runtime.IProgressMonitor monitor, ExporterExtension[] extensions)
          Exports the current configuration.
static java.lang.String[] getAllArchivePaths()
          Returns the paths of all archives previously exported.
 java.lang.String[] getApplicationProjectNames()
          Returns the names of the application projects.
 java.io.File getArchive()
          Returns the WAR file to create.
 java.lang.String[] getFragmentProjectNames()
          Returns the names of the fragment projects.
static java.lang.String getLastArchivePath()
          Returns the path of the archive most recently exported.
 java.lang.String[] getMediaProjectNames()
          Returns the names of the media projects.
 org.eclipse.core.resources.IProject getProject(java.lang.String projectName)
          Returns the specified project.
 boolean isProjectDirty(java.lang.String projectName)
          Returns true if the specified project is dirty.
 boolean isProjectSelected(java.lang.String projectName)
          Returns true if the specified project is selected.
 void removeExporterObserver(ExporterObserver observer)
          Removed an observer from this exporter.
 void selectProject(java.lang.String projectName)
          Marks the specified project as selected.
 void setArchive(java.io.File archive)
          Sets the WAR file to create.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Exporter

public Exporter(org.eclipse.ui.IWorkbench workbench)
Creates a new Exporter.

Method Detail

getLastArchivePath

public static java.lang.String getLastArchivePath()
Returns the path of the archive most recently exported.

Returns:
The path of the archive most recently exported.

getAllArchivePaths

public static java.lang.String[] getAllArchivePaths()
Returns the paths of all archives previously exported.

Returns:
The paths of all archives previously exported.

getArchive

public java.io.File getArchive()
Returns the WAR file to create.

Returns:
The WAR file to create.

setArchive

public void setArchive(java.io.File archive)
Sets the WAR file to create.

Parameters:
archive - The WAR file to create.

getApplicationProjectNames

public java.lang.String[] getApplicationProjectNames()
Returns the names of the application projects.

Returns:
The names of the application projects.

getFragmentProjectNames

public java.lang.String[] getFragmentProjectNames()
Returns the names of the fragment projects.

Returns:
The names of the fragment projects.

getMediaProjectNames

public java.lang.String[] getMediaProjectNames()
Returns the names of the media projects.

Returns:
The names of the media projects.

getProject

public org.eclipse.core.resources.IProject getProject(java.lang.String projectName)
Returns the specified project.

Parameters:
projectName - The name of the project to return.
Returns:
The specified project.

isProjectSelected

public boolean isProjectSelected(java.lang.String projectName)
Returns true if the specified project is selected.

Parameters:
projectName - The name of the project to check.
Returns:
True if the specified project is selected.

isProjectDirty

public boolean isProjectDirty(java.lang.String projectName)
Returns true if the specified project is dirty.

Parameters:
projectName - The name of the project to check.
Returns:
True if the specified project is dirty.

selectProject

public void selectProject(java.lang.String projectName)
Marks the specified project as selected.

Parameters:
projectName - The project to mark.

deselectProject

public void deselectProject(java.lang.String projectName)
Marks the specified project as not selected.

Parameters:
projectName - The project to mark.

exportWebApplication

public void exportWebApplication(org.eclipse.core.runtime.IProgressMonitor monitor,
                                 ExporterExtension[] extensions)
                          throws org.eclipse.core.runtime.CoreException
Exports the current configuration.

Parameters:
monitor - The monitor to inform of progress.
extensions - The extensions to use.
Throws:
org.eclipse.core.runtime.CoreException - If the export fails.

addExporterObserver

public void addExporterObserver(ExporterObserver observer)
Adds an observer to this exporter.

Parameters:
observer - The observer to add.

removeExporterObserver

public void removeExporterObserver(ExporterObserver observer)
Removed an observer from this exporter.

Parameters:
observer - The observer to remove.